﻿@model ICollection<NorthwindMVC.Models.Order_Detail>

<div class="tableinner">
    <div class="rowinner">
        <div class="cellinner single">
            <table>

                <tr>
                    <th class="bold">@Html.DisplayNameFor(model => Model.FirstOrDefault().Product)</th>
                    <th class="bold">@Html.DisplayNameFor(model => Model.FirstOrDefault().Quantity)</th>
                    <th class="bold">@Html.DisplayNameFor(model => Model.FirstOrDefault().UnitPrice)</th>
                    <th class="bold">@Html.DisplayNameFor(model => Model.FirstOrDefault().Discount)</th>
                    <th class="bold">Subtotal</th>
                </tr>

                @foreach (NorthwindMVC.Models.Order_Detail line in Model)
                {
                    <tr>
                        <td>@line.Product.ProductName</td>
                        <td class="alignright">@line.Quantity</td>
                        <td class="alignright">@line.UnitPrice</td>
                        <td class="alignright">@line.Discount</td>
                        <td class="alignright">@NorthwindMVC.Controllers.OrderController.getOrderDetailTotal(line)</td>
                    </tr>
                }
            </table>
        </div>
    </div>
</div>
